Skip to content

build(deps): keep PySide6 below 6.12 on Python < 3.12 - #125

Merged
JeanExtreme002 merged 1 commit into
mainfrom
fix/pin-pyside6-below-6.12-on-py311
Nov 3, 2026
Merged

JeanExtreme002 merged 1 commit into
mainfrom
fix/pin-pyside6-below-6.12-on-py311

Conversation

@JeanExtreme002

Copy link
Copy Markdown
Owner

Why

build (3.11, ubuntu-latest) has timed out at 20 minutes on every run since 2026-10-29 (runs 40818789463, 41273979268, 41355657134). The log looked like a hung memory scan, but the scan had passed. The real sequence:

  1. xdist worker gw0 aborts in tests/app/test_results_model.py:
    Fatal Python error: none_dealloc: deallocating None: bug likely caused by a refcount error in a C extension
    Extension modules: shiboken6.Shiboken, PySide6.QtCore, PySide6.QtGui, PySide6.QtWidgets, ...
    
  2. xdist replaces it with gw2, and the session then sits on a futex until the job timeout. A diagnostic run on the same image confirmed this: all remaining tests had finished, every Python process was sleeping, and the crashed worker was a zombie.

Root cause

PySide6 6.12.0's Linux wheels drop a reference to None on ordinary void Qt calls (upstream PYSIDE-3474; reported by several projects, e.g. optiland/optiland#1069, eoyilmaz/displaycal-py3#998). Measuring sys.getrefcount(None) per test on 3.11 shows the count sliding across the app suite until the singleton is freed. On 3.12+ None is immortal (PEP 683) so the leak is harmless, which is why only the 3.10/3.11 cells were exposed, and 3.10 passed by margin. The runner-image change only moved the baseline enough to tip 3.11 over.

Fix

Cap the app extra below 6.12 on Python < 3.12 (resolves to 6.11.3) and leave 3.12+ as is. No 6.12.x release with a fix exists yet; the comment in pyproject.toml says when to lift the cap.

Verified locally on 3.11 with the pin: the app suite passes (234 tests) with PySide6 6.11.3.

Follow-up worth considering (not in this PR)

A crashed xdist worker currently turns into a 20-minute silent timeout. --max-worker-restart=0 would fail the job immediately with the crash in the log instead.

🤖 Generated with Claude Code

The `build (3.11, ubuntu-latest)` cell has hit its 20-minute timeout on
every run since the runner image moved to Ubuntu 26.04 (2026-10-29,
2026-11-01, 2026-11-02). The log shows what the timeout hid: xdist worker
gw0 died in tests/app/test_results_model.py with

    Fatal Python error: none_dealloc: deallocating None: bug likely caused
    by a refcount error in a C extension

and the session then hung on the replacement worker until the job was
killed, so the last line was a scan test that had in fact passed.

PySide6 6.12.0's Linux wheels drop a reference to ``None`` on ordinary
void Qt calls (upstream PYSIDE-3474). Tracking ``sys.getrefcount(None)``
per test on 3.11 shows the count sliding across the app suite until the
singleton is freed. On 3.12+ ``None`` is immortal (PEP 683), which is why
only the 3.10/3.11 cells were exposed and the 3.10 one passed by margin.
No 6.12.x release with a fix exists yet, so cap the app extra below 6.12
on Python < 3.12 (resolves to 6.11.3) and leave 3.12+ unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.99%. Comparing base (b1c7d60) to head (f2ca12a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
- Coverage   93.02%   92.99%   -0.03%     
==========================================
  Files          43       43              
  Lines        4671     4671              
==========================================
- Hits         4345     4344       -1     
- Misses        326      327       +1     
Flag Coverage Δ
Linux-py3.10 68.17% <ø> (ø)
Linux-py3.11 68.17% <ø> (ø)
Linux-py3.12 68.17% <ø> (ø)
Linux-py3.13 68.17% <ø> (ø)
Linux-py3.14 68.08% <ø> (ø)
Linux-py3.15 68.08% <ø> (ø)
Windows-py3.10 69.83% <ø> (ø)
Windows-py3.11 69.83% <ø> (ø)
Windows-py3.12 69.83% <ø> (ø)
Windows-py3.13 69.83% <ø> (ø)
Windows-py3.14 69.74% <ø> (ø)
Windows-py3.15 69.74% <ø> (ø)
macOS-py3.10 91.47% <ø> (-0.05%) ⬇️
macOS-py3.12 91.47% <ø> (-0.05%) ⬇️
macOS-py3.14 91.44% <ø> (ø)
mcp-Linux-py3.12 92.15% <ø> (ø)
mcp-Windows-py3.12 91.73% <ø> (ø)
mcp-macOS-py3.12 93.14% <ø> (ø)
speed-Linux-py3.12 70.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JeanExtreme002
JeanExtreme002 merged commit accda0a into main Nov 3, 2026
29 checks passed
@github-actions
github-actions Bot deleted the fix/pin-pyside6-below-6.12-on-py311 branch November 3, 2026 16:22
JeanExtreme002 added a commit that referenced this pull request Nov 3, 2026
Patch release carrying #125: the `app` extra now keeps PySide6 below 6.12
on Python < 3.12. The published 3.4.0 metadata still resolves to PySide6
6.12.0 there, whose Linux wheels leak references to ``None`` and abort the
interpreter (upstream PYSIDE-3474), so the cap only protects users once
it is on PyPI.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant